Skip to content

Add lazy import feature for LLM#17

Merged
nicolo-rinaldi merged 4 commits intomainfrom
github-issues/13-lazy-import
Dec 10, 2025
Merged

Add lazy import feature for LLM#17
nicolo-rinaldi merged 4 commits intomainfrom
github-issues/13-lazy-import

Conversation

@nicolo-rinaldi
Copy link
Collaborator

Relates to issue#13

  • added lazy import feature for LLMServiceFactory: now the Chat Model is initialized at the moment of the first call (so also in the tutorial repo the API key is not needed)
  • added tests to verify the new expected behaviour

@nicolo-rinaldi nicolo-rinaldi force-pushed the github-issues/13-lazy-import branch from f1f4e27 to d3ddfd8 Compare December 9, 2025 13:24
"openai": build_openai,
"gemini": build_gemini,
}
_cache: Optional[LazyLLM] = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: for naming -> maybe cached_lazy_llm ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed

@nicolo-rinaldi nicolo-rinaldi force-pushed the github-issues/13-lazy-import branch from 59db8d9 to 5039412 Compare December 10, 2025 10:18
@nicolo-rinaldi nicolo-rinaldi force-pushed the github-issues/13-lazy-import branch from 8e31554 to 3764786 Compare December 10, 2025 10:34
@nicolo-rinaldi nicolo-rinaldi merged commit b090bd2 into main Dec 10, 2025
3 checks passed
@nicolo-rinaldi nicolo-rinaldi deleted the github-issues/13-lazy-import branch December 10, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants